﻿<!DOCTYPE html>
<html>
     <head>
          <meta charset="UTF-8">
          <title></title>
			<script src="js/base.js"></script>
			<script type="text/javascript">
				var c = 0.0557; //概率种子
				
				var p = 0.2; //期望概率
				var count = 0;
				for(var i=0; i<10000; i++){
					var num = Math.random();
					if(num < p){
						//暴击发生
						count++;
						p = c;
					} else {
						p += c;
					}
				}
				console.log("攻击10000次，暴击概率："+count/10000);
				
			</script>
     </head>
    
     <body>
       
     </body>
</html>
